<!-- 相当于给模板定义一个名字 define end 成对出现 -->
 {{ define "backstage/changePassword.html" }}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>天猫商城</title>
    <link rel="shortcut icon" href="/static/images/tianmao.jpg" type="image/x-icon">
    <style>
        .back {
            height: 100vh;           /* 容器高度，例如100%视口高度 */
            display: flex;
            justify-content: center; /* 水平居中 */
            align-items: center;     /* 垂直居中 */

            .sub-form {
                background-color: antiquewhite;
                width: 80vh;
                height: 450px;
                padding-bottom: 10px;
                .title {
                    color: rgb(86, 105, 202);
                    margin: 50px 0 50px;
                    text-align: center;
                }
                .need {
                    color: red;
                }
                .err {
                    color: red;
                    margin-top: 10px;
                }
                .btn {
                    background-color: white;
                    color: green;
                    border: 1px solid white;
                    cursor: pointer;
                    margin-left: 40px;
                }
            }
        }
        input {
            font-size: 16px;
        }
    </style>
</head>
<body>
    <div class="back">
         <div class="sub-form">
            <form style="margin: 20px;" action="/back/mine/doUptPassword" method="post">
                <div><h2 class="title">修改密码</h2></div>
                <dl>
                    <dd>
                        <span class="need">*</span>原密码： 
                        <input required type="password" name="oldPwd" value="{{.info.OldPwd}}" placeholder="请输入原密码">
                    </dd>
                    <br>
                    <dd>
                        <span class="need">*</span>密码： 
                        <input required type="password" name="newPwd" value="{{.info.NewPwd}}" placeholder="请输入密码">
                    </dd>
                    <br>
                    <dd>
                        <span class="need">*</span>确认密码： 
                        <input required type="password" name="confPwd" value="{{.info.ConfPwd}}" placeholder="请输入确认密码">
                    </dd>
                    <dd>
                        {{if eq .errStatus "1"}}
                            <div class="err">确认密码错误！</div>
                        {{else if eq .errStatus "2"}}
                            <div class="err">原密码错误！</div>
                        {{end}}
                    </dd>
                    <br>
                    <dd>
                        <input class="btn" type="submit" value="修改">
                        <input class="btn" type="button" value="返回" onclick="back()">
                    </dd>
                </dl>
            </form>
         </div>
    </div>

    <script>
        function back(){
            location.href="/back/mine/opt/0";
        }
    </script>
</body>
</html>
{{ end }}